//
//  WSVideoTableViewCell.m
//  RunningMan
//
//  Created by 王帅 on 16/5/25.
//  Copyright © 2016年 WSJ. All rights reserved.
//

#import "WSVideoTableViewCell.h"
#import "WSMyTool.h"
@interface WSVideoTableViewCell ()
@property (nonatomic, strong) UILabel *labelTitle;
@property (nonatomic, strong) UIImageView *imageViewPoto;
@end
@implementation WSVideoTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubView];
    }
    return self;
}

- (void)createSubView {
    self.imageViewPoto = [[UIImageView alloc] initWithFrame:CGRectMake(5, 10, WIDTH - 10, 200 * FITHEIGHT)];
    [self.contentView addSubview:self.imageViewPoto];
        
    self.labelTitle = [[UILabel alloc] initWithFrame:CGRectMake(5, 180, WIDTH - 10, 25 * FITHEIGHT)];
    self.labelTitle.textColor = [UIColor whiteColor];\
    self.labelTitle.font = [UIFont boldSystemFontOfSize:19 * FITWIDTH];
    self.labelTitle.backgroundColor = [UIColor colorWithRed:100 / 255.0 green:100 / 255.0 blue:100 / 255.0 alpha:0.5];
    
//    self.labelTitle.font = [UIFont fontWithName:@"Helvetica-Bold"size:18.f];
    [self.contentView addSubview:self.labelTitle];
    
}
- (void)setVideoModel:(WSVideoModel *)videoModel {
    _videoModel = videoModel;
    [self.imageViewPoto sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://wdquan-space.b0.upaiyun.com/%@", videoModel.path]] placeholderImage:[UIImage imageNamed:@"zwt"]];
}

- (void)setTitleModel:(WSTitleModel *)titleModel {
    _titleModel = titleModel;
    self.labelTitle.text = titleModel.Description;
}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
